package com.rcloud.server.sealtalk.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

/**
 * 轮播图
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "index_banner")
public class IndexBanner {
    /**
     * 主键ID
     */
    @Id
    @Column(name = "id")
    private Integer id;

    /**
     * 图片或视频地址
     */
    @Column(name = "img_url")
    private String imgUrl;
    /**
     * 说明文字,描述
     */
    @Column(name = "des")
    private String des;

    /**
     * 标题
     */
    @Column(name = "title")
    private String title;

    /**
     * 链接
     */
    @Column(name = "link")
    private String link;

    /**
     * 状态  1正常 0失效
     */
    @Column(name = "`status`")
    private Integer status;

    /**
     * 顺序
     */
    @Column(name = "seq")
    private Integer seq;

    /**
     * 轮播类型 1.广告页图片轮播 2.广告页视频轮播
     */
    @Column(name = "img_type")
    private Integer imgType;

    /**
     * 跳转标识 1内部跳转 2 外链跳转 3 客户端跳转
     */
    @Column(name = "turn_type")
    private Integer turnType;

    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @Column(name = "upload_time")
    private Date uploadTime;
}